#pragma once

#include "Ability/EditorAbilityViewModel.h"
#include "EditorDebugConsoleModel.h"
#include "Math/Color.h"
#include "EditorDebugConsoleViewModel.m.h"

class REditorDebugConsoleModel;

RCLASS()
class REditorDebugConsoleViewModel : public REditorAbilityViewModel
{
    ROBJECT

public:
    void BindModel(TSharedObjectPtr<REditorAbilityModel> InModel) override;
    virtual TSharedObjectPtr<RTexture2D> GetIcon() const override;
    virtual TSharedObjectPtr<RTexture2D> GetHighlightIcon() const override;

protected:
    TWeakObjectPtr<REditorDebugConsoleModel> OutputModel;
    TSharedObjectPtr<RTexture2D> Icon;
    TSharedObjectPtr<RTexture2D> HighlightIcon;

public:
    void ClearLines();
    TDelegate<void> OnLineNumChanged;
    int64_t GetLineNum() const;
    const CString& GetLine(int64_t InIndex) ;
    SColor GetLineColor(int64_t InIndex);

    void ClearAll();
    TSharedObjectPtr<RTexture2D> ClearAllIcon;
};
